package cn.com.chengmandian.bike.service;

import cn.com.chengmandian.bike.dto.RideOrderPayForm;
import cn.com.chengmandian.bike.model.EbMemberPay;
import cn.com.chengmandian.bike.model.EbRefundInfo;
import cn.com.chengmandian.bike.model.EbRideOrder;
import cn.com.chengmandian.bike.model.EbRidePenalty;
import cn.com.chengmandian.core.web.pojo.AjaxResult;
import cn.com.chengmandian.service.bike.form.RidePenaltyRefundForm;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;

public interface IEbRidePenaltyService extends IService<EbRidePenalty> {
    /**
     * 创建
     * @param rideOrder
     */
    void addByOrder(EbRideOrder rideOrder, BigDecimal money);

    /**
     * 骑行订单支付
     *
     * @param clientIp
     * @param rideOrder
     * @return
     */
    AjaxResult payByOrder(String clientIp, EbRideOrder rideOrder, RideOrderPayForm rideOrderPayForm) throws Exception;

    /**
     * 罚款支付成功
     * @param memberPay
     */
    void paySuccess(EbMemberPay memberPay);

    /**
     * 退款
     * @param form
     */
    void refundByOrder(RidePenaltyRefundForm form);

    /**
     * 退款响应通知
     */
    void refundSuccess(EbRefundInfo refundInfo);
}
